package com.fafu.rbac.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
    * 权限表
    */
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_permission")
public class Permission {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 按钮权限标识
     */
    @TableField(value = "code")
    private String code;

    /**
     * 路由路径（浏览器地址栏路径）
     */
    @TableField(value = "`path`")
    private String path;

    /**
     * 跳转路径
     */
    @TableField(value = "redirect")
    private String redirect;

    /**
     * 组件路径（不带后缀的vue页面完整路径）
     */
    @TableField(value = "component")
    private String component;

    /**
     * 图标
     */
    @TableField(value = "icon")
    private String icon;

    /**
     * 显示优先级
     */
    @TableField(value = "priority")
    private Integer priority;

    /**
     * 状态：1可用 2不可用
     */
    @TableField(value = "`state`")
    private Integer state;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
}